<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app" style="color: blue; font-size: 18px">
    123 {{ msg }} 234 {{ abc }} 345
    <p class="p">{{ str }}123</p>
  </div>
  <button id="button">点击</button>
  
  <script type="module">
    import Vue from './src/index.js'
    Vue.Mixin({
      created(){
        // console.log(1);
      }
    })
    Vue.Mixin({
      created(){
        // console.log(2);
      },
      beforeCreate(){
        // console.log('beforeCreate')
      },
      beforeMount(){
        // console.log('beforeMount')
      },
      mounted(){
        // console.log('mounted')
      }
    })
    const vm = new Vue({
      el: '#app',
      data(){
        return {
          msg: '-1msg1-',
          abc: '-1abc1-',
          str: '-1str1-'
        }
      },
      created(){
        // console.log(3);
      },
      mounted(){
        // console.log('mounted1');
      }
    })

    document.getElementById('button').onclick = function(){
      vm.msg = '变更后'
      vm._update(vm._render());
    };

  </script>
</body>
</html>